// ResourceManager.cpp: implementation of the ResourceManager class.
//
//////////////////////////////////////////////////////////////////////

#include "StdAfx.h"
#include "ResourceManager.h"
#include "ProductCatalogManager.h"
#include "JointFormatManager.h"
#include "DBConnectionManager.h"
using namespace Global;
using namespace DAWrapper;

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

__declspec(dllexport) ResourceManager* ResourceManager::g_ResourceManager = 0;

ResourceManager::ResourceManager()
{
	Init();
}

ResourceManager::~ResourceManager()
{
	Clear();
}

void ResourceManager::Init()
{	
	CoInitialize( NULL );
}

void ResourceManager::Clear()
{
	DBConnectionManager::DeleteInstance();
	JointSystem::ProductCatalogManager::DeleteInstance();
	JointSystem::JointFormatManager::DeleteInstance();
	CoUninitialize();
}
